package com.bmlstrategys
{
	import com.strategy.IBML;
	import com.utils.Utils;
	
	import flash.utils.ByteArray;
	
	public class ItemFurnateInfo extends BMLBase implements IBML
	{
		public function ItemFurnateInfo(data:ByteArray)
		{
			super(data);
		}
		
		public function bmlstrategyxml():XML
		{
			
			bmlData.endian = "littleEndian";
			bmlData.position = 0;
			var p1:int = bmlData.readUnsignedInt();
			bmlData.position = 10;
			var num:int = bmlData.readUnsignedInt();
			
			
//			var num:int = Utils.readHead(bmlData);
			var index:int=0;
			var xmlData:XML = new XML();
			xmlData = <root/>;
			
			while(index<num)
			{
				xmlData.appendChild(<furnates/>);
				xmlData.furnates[index].@meltID = bmlData.readUnsignedInt();
				xmlData.furnates[index].@firstMenuID =  bmlData.readUnsignedInt();
				xmlData.furnates[index].@secondMenuID = bmlData.readUnsignedInt();
				
				xmlData.furnates[index].@meltedItemTmpID = bmlData.readUnsignedInt();
				xmlData.furnates[index].@needItemTmpID =  bmlData.readUnsignedInt();
				xmlData.furnates[index].@needItemNum = bmlData.readUnsignedInt();
				index++;
			}
			
			return xmlData;
		}
	}
}